<template>
    <div>
                 <ul class="todo-main">
                    <li v-for="(task, index) in taskArray" :key="index">
                        <label>
                            <input type="checkbox" />
                            <span>{{task.taskName}}</span>
                        </label>
                        <button class="btn btn-danger" >删除</button>
                    </li>
                </ul>
    </div>
</template>
<script>
export default ({
    name:"list",
    data() {
        return {
            taskArray:[
                {taskId:1001,taskName:'学习htm'},
                {taskId:1002,taskName:'学习css'},
                {taskId:1003,taskName:'学习vue'},
                {taskId:1004,taskName:'学习java'},
                ]
        }
    },
})
</script>
<style>
    /* li {
  list-style: none;
  height: 36px;
  line-height: 36px;
  padding: 0 5px;
  border-bottom: 1px solid #ddd;
}

li label {
  float: left;
  cursor: pointer;
}

li label li input {
  vertical-align: middle;
  margin-right: 6px;
  position: relative;
  top: -1px;
}

li button {
  float: right;
  display: none;
  margin-top: 3px;
}

li:before {
  content: initial;
}

li:last-child {
  border-bottom: none;
} */

</style>